package com.gisterrier.client;

import java.util.ArrayList;
import java.util.TreeMap;

import com.common.shared.ClSelectionItem;
import com.common.shared.map.GisMapClickedObject;
import com.gisterrier.shared.BuildingCustomer;
import com.gisterrier.shared.BuildingCustomerShort;
import com.gisterrier.shared.Customer;
import com.gisterrier.shared.CustomerBuildings;
import com.gisterrier.shared.Map_Customer_to_Building;
import com.gisterrier.shared.Map_Customer_to_Building_Obj;
import com.gisterrier.shared.Map_Street_to_Street;
import com.gisterrier.shared.ObjSelectionresult;
import com.google.gwt.user.client.rpc.AsyncCallback;

/**
 * The async counterpart of <code>GreetingService</code>.
 */
public interface GisTerrierServiceAsync {

	void getRegions(AsyncCallback<ArrayList<ClSelectionItem>> callback);

	void getSubRegions(long regionId,
			AsyncCallback<ArrayList<ClSelectionItem>> callback);

	void getCities(long subRegionId,
			AsyncCallback<ArrayList<ClSelectionItem>> callback);

	void getStreets(long cityId,
			AsyncCallback<ArrayList<ClSelectionItem>> callback);

	void getTopType(int type, AsyncCallback<ArrayList<ClSelectionItem>> callback);

	void getItemsForType(int type, long parentId,
			AsyncCallback<ArrayList<ClSelectionItem>> callback);

	void getAllTopTypes(
			AsyncCallback<TreeMap<Integer, ArrayList<ClSelectionItem>>> callback);

	void getCustomer(int customerid, AsyncCallback<Customer> callback);

	void getBuildingFor(double px, double py, int srid,
			AsyncCallback<CustomerBuildings> callback);

	void getCustomersForBuilding(CustomerBuildings b,
			AsyncCallback<CustomerBuildings> callback);

	void getCustomersForBuilding(double px, double py, int srid,
			AsyncCallback<CustomerBuildings> callback);

	void getGisMapClickedObjects(double px, double py, int srid,
			AsyncCallback<ArrayList<GisMapClickedObject>> callback);

	void getMap_Street_to_Street(long mapstreet_or_bill_street_id,
			boolean mapstreet, AsyncCallback<Map_Street_to_Street> callback);

	void insertMap_Street_to_Street(Map_Street_to_Street street,
			AsyncCallback<Long> callback);

	void getMap_Customer_to_Building(long mapbuild_or_cust, boolean mapbuild,
			AsyncCallback<Map_Customer_to_Building_Obj> callback);

	void insertMap_Customer_to_Building(Map_Customer_to_Building mapbuildCust,
			AsyncCallback<Long> callback);

	void getObjSelectionresult(long building_id,
			AsyncCallback<ObjSelectionresult> callback);

	void getAddressInfo(long raioni, long regioni, long cityid, long streetid,
			AsyncCallback<TreeMap<Integer, ArrayList<ClSelectionItem>>> callback);

	void getBuildingCustomer(GisMapClickedObject clObj,
			AsyncCallback<BuildingCustomer> callback);

	void getCustomersForStreet(long street_id, Long zone,
			AsyncCallback<ArrayList<BuildingCustomerShort>> callback);

	void insertMap_Customer_to_Building(
			ArrayList<BuildingCustomerShort> mapbuildCusts,
			AsyncCallback<ArrayList<Long>> callback);

	void getBuilding(long building_id,
			AsyncCallback<GisMapClickedObject> callback);

	void getShortCustomersForBuilding(long building_id,
			AsyncCallback<ArrayList<BuildingCustomerShort>> callback);

	void getZones(Long regionId, Long subRegionId, Long cityId, Long streetid,
			AsyncCallback<ArrayList<ClSelectionItem>> callback);

}
